const crypto = require('crypto');
module.exports = {
    "secretKey":"lovo",
    "algorithms":["HS256"],
    "unless":{
        path:[
            // '/users/login','/users',"/users/"
            /^\/users\/.*/,"/favicon.ico","/upload","/swagger","/index.html"
        ]
    },
}

function sha256(str){
    let sha = crypto.createHash('sha256');
    return sha.update(str).digest('hex');
}

module.exports.sha256 = sha256;

console.log(sha256("123456"));
console.log(sha256("123457"));